import { useState } from 'react';
import Child from './child';
import { Button } from 'antd';

function page3() {
  const [sex, setSex] = useState(true);
  const editSex = (params: string) => {
    console.log(params);
    setSex(!sex);
  };
  const editSex1 = (params: string) => {
    console.log(params);
    setSex(!sex);
  };
  return (
    <div>
      <span>父组件</span>
      <Child name='子组件' age={20} callBack={editSex} callBack1={editSex1}></Child>
      <div>{sex ? '男' : '女'}</div>
    </div>
  );
}
export default page3;